package com.yatu.codegen.util;

import java.io.IOException;
import java.util.Properties;

public final class PropertiesUtil {
	private static final String configFileName = "config.properties";
	private static Properties pro;

	static {
		pro = new Properties();
		try {
			pro.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(configFileName));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String load(String name, String defaultValue) {
		return pro.getProperty(name, defaultValue);
	}
}
